<html>

<h3>HTML mimetype</h3>

<a download href="data:text/html,download" id="download-link">&lt;a download link&gt;</a>
<br><br>
<button id='navigate-top-frame-to-html'
    onclick='top.location.href=`data:text/html,
        <script>console.log(&quot;NAVIGATION_SUCCESSFUL&quot;)</script>`'>
  Navigate top frame to data URL HTML
</button>
<br>
<button id='window-open-html'
    onclick='window.open(`data:text/html,
        <script>console.log(&quot;NAVIGATION_SUCCESSFUL&quot;)</script>`);'>
  Open new window with a data URL HTML
</button>
<button id='window-open-redirect'
    onclick='window.open(`/server-redirect?data:text/html,<script>console.log(&quot;NAVIGATION_SUCCESSFUL&quot;)</script>`);'>
  Open new window with a redirect to data URL
</button>
<br>
<form method="post" action="data:text/html,
             <script>console.log('NAVIGATION_SUCCESSFUL')</script>">
  <input type=submit id='form-post-to-html'
      value="Submit form to data URL HTML">
</form>

<h3>octet-stream mimetype</h3>

<button id='navigate-top-frame-to-octetstream'
    onclick='top.location.href=`data:application/octet-stream,test`'>
  Navigate top frame to data URL octet-stream
</button>
<br>
<button id='window-open-octetstream'
    onclick='window.open(`data:application/octet-stream,test`)'>
  Open new window with a data URL octet-stream
</button>
<form method="post" action="data:application/octet-stream,test">
  <input type=submit id='form-post-to-octetstream'
      value="Submit form to data URL octet-stream">
</form>
<h3>PDF mimetype</h3>

<button id='navigate-top-frame-to-pdf'
    onclick='top.location.href=`data:application/pdf;base64,
    JVBERi0xLjcKMSAwIG9iaiA8PCAvVHlwZSAvUGFnZSAvUG
    FyZW50IDMgMCBSIC9SZXNvdXJjZXMgNSAwIFIgL0NvbnRlbnRzIDIgMCBSID4+CmVuZG9iagoy
    IDAgb2JqIDw8IC9MZW5ndGggNTEgPj4KIHN0cmVhbSBCVAogL0YxIDEyIFRmCiAxIDAgMCAxID
    EwMCAyMCBUbQogKEhlbGxvIFdvcmxkKVRqCiBFVAogZW5kc3RyZWFtCmVuZG9iagozIDAgb2Jq
    IDw8IC9UeXBlIC9QYWdlcyAvS2lkcyBbIDEgMCBSIF0gL0NvdW50IDEgL01lZGlhQm94IFsgMC
    AwIDMwMCA1MF0gPj4KZW5kb2JqCjQgMCBvYmogPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5
    cGUxIC9OYW1lIC9GMSAvQmFzZUZvbnQvQXJpYWwgPj4KZW5kb2JqCjUgMCBvYmogPDwgL1Byb2
    NTZXRbL1BERi9UZXh0XSAvRm9udCA8PC9GMSA0IDAgUiA+PiA+PgplbmRvYmoKNiAwIG9iaiA8
    PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMyAwIFIgPj4KZW5kb2JqCnRyYWlsZXIgPDwgL1Jvb3
    QgNiAwIFIgPj4K`'>
  Navigate top frame to data URL PDF
</button>
<br>
<button id='window-open-pdf'
    onclick='window.open(`data:application/pdf;base64,
    JVBERi0xLjcKMSAwIG9iaiA8PCAvVHlwZSAvUGFnZSAvUG
    FyZW50IDMgMCBSIC9SZXNvdXJjZXMgNSAwIFIgL0NvbnRlbnRzIDIgMCBSID4+CmVuZG9iagoy
    IDAgb2JqIDw8IC9MZW5ndGggNTEgPj4KIHN0cmVhbSBCVAogL0YxIDEyIFRmCiAxIDAgMCAxID
    EwMCAyMCBUbQogKEhlbGxvIFdvcmxkKVRqCiBFVAogZW5kc3RyZWFtCmVuZG9iagozIDAgb2Jq
    IDw8IC9UeXBlIC9QYWdlcyAvS2lkcyBbIDEgMCBSIF0gL0NvdW50IDEgL01lZGlhQm94IFsgMC
    AwIDMwMCA1MF0gPj4KZW5kb2JqCjQgMCBvYmogPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5
    cGUxIC9OYW1lIC9GMSAvQmFzZUZvbnQvQXJpYWwgPj4KZW5kb2JqCjUgMCBvYmogPDwgL1Byb2
    NTZXRbL1BERi9UZXh0XSAvRm9udCA8PC9GMSA0IDAgUiA+PiA+PgplbmRvYmoKNiAwIG9iaiA8
    PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMyAwIFIgPj4KZW5kb2JqCnRyYWlsZXIgPDwgL1Jvb3
    QgNiAwIFIgPj4K`)'>
  Open new window with a data URL PDF
</button>
<br>
<form method="post" action='data:application/pdf;base64,
    JVBERi0xLjcKMSAwIG9iaiA8PCAvVHlwZSAvUGFnZSAvUG
    FyZW50IDMgMCBSIC9SZXNvdXJjZXMgNSAwIFIgL0NvbnRlbnRzIDIgMCBSID4+CmVuZG9iagoy
    IDAgb2JqIDw8IC9MZW5ndGggNTEgPj4KIHN0cmVhbSBCVAogL0YxIDEyIFRmCiAxIDAgMCAxID
    EwMCAyMCBUbQogKEhlbGxvIFdvcmxkKVRqCiBFVAogZW5kc3RyZWFtCmVuZG9iagozIDAgb2Jq
    IDw8IC9UeXBlIC9QYWdlcyAvS2lkcyBbIDEgMCBSIF0gL0NvdW50IDEgL01lZGlhQm94IFsgMC
    AwIDMwMCA1MF0gPj4KZW5kb2JqCjQgMCBvYmogPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5
    cGUxIC9OYW1lIC9GMSAvQmFzZUZvbnQvQXJpYWwgPj4KZW5kb2JqCjUgMCBvYmogPDwgL1Byb2
    NTZXRbL1BERi9UZXh0XSAvRm9udCA8PC9GMSA0IDAgUiA+PiA+PgplbmRvYmoKNiAwIG9iaiA8
    PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMyAwIFIgPj4KZW5kb2JqCnRyYWlsZXIgPDwgL1Jvb3
    QgNiAwIFIgPj4K'>
  <input type=submit id='form-post-to-pdf'
      value="Submit form to data URL PDF">
</form>

<h3>Unknown mimetype</h3>

<button id='navigate-top-frame-to-unknown-mimetype'
    onclick='top.location.href=`data:unknown/mimetype,test`'>
  Navigate top frame to data URL unknown mimetype
</button>
<br>
<button id='window-open-unknown-mimetype'
    onclick='window.open(`data:unknown/mimetype,test`)'>
  Open new window with a data URL unknown mimetype
</button>
<form method="post" action="data:unknown/mimetype,test">
  <input type=submit id='form-post-to-unknown-mimetype'
         value='Submit form to data URL unknown mimetype'>
</form>
<script>
  if (window.domAutomationController)
      window.domAutomationController.send("READY");
</script>
</html>
